package com.banciyuan.bcywebview.utils.http;

import android.content.Context;

import com.android.volley.RequestQueue;

/**
 * Created by squall on 2015/8/13.
 */
public class VolleyQueue {

    private static RequestQueue requestQueue;
    private static RequestQueue requestQueueNotUseHttpDns;

    private VolleyQueue() {

    }

    public static RequestQueue getRquest(Context context) {

        if (null != requestQueue) {
            return requestQueue;
        } else {
            requestQueue = com.banciyuan.bcywebview.utils.http.Volley.newRequestQueue(context);
            return requestQueue;
        }
    }

    public static RequestQueue getRquestNotUseHttpDns(Context context, boolean httpdns) {

        if (null != requestQueueNotUseHttpDns) {
            return requestQueueNotUseHttpDns;
        } else {
            requestQueueNotUseHttpDns = com.banciyuan.bcywebview.utils.http.Volley.newRequestQueue(context, httpdns);
            return requestQueueNotUseHttpDns;
        }
    }
}
